//导入路由依赖
import { createRouter, createWebHashHistory } from 'vue-router'
//  引入路由常量路由数组
import { constantRoutes } from './routes'

const router = createRouter({
  history: createWebHashHistory(), // hash模式
  routes: constantRoutes, // 路由数组
  scrollBehavior() {
    // 滚动行为
    return { top: 0, left: 0 }
  },
})

export default router
